{include file="public/header" /}

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>商品名称</th>
                                <th>商品图册</th>
                                <th>商品规格</th>
                                <th>购买数量</th>
                                <th>购买单价</th>
                                <th>购买总价</th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $list as $v}
                            <tr>
                                <td>{$v.id|default=''}</td>
                                <td>{$v.title|default=''}</td>
                                <td>
                                    <div id="layer-photos" class="layer-photos">
                                        {foreach $v.images as $vs}
                                        <img layer-pid="" layer-src="{$vs|default=''}" src="{$vs|default=''}"
                                            alt="{$title|default=''}">
                                        {/foreach}
                                    </div>
                                </td>
                                <td>{$v.specname|default=''}</td>
                                <td>{$v.number|default=''}</td>
                                <td>{$v.price|default=''}元</td>
                                <td>{$v.total|default=''}元</td>
                            </tr>
                            {/foreach}

                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body">
                    <div class="page">
                        {$list->render()|raw}
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['form', 'upload'], function () {
        var $ = layui.jquery
            , form = layui.form
            , layer = layui.layer;
    });
</script>
<script>
    layer.photos({
        photos: '#layer-photos'
        , anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
    });
</script>
{include file="public/footer"}